home *** CD-ROM | disk | FTP | other *** search
/ PC Open 96 / PC Open 96 CD3.bin / fscommand / index.swf / scripts / DefineSprite_66 / frame_1 / DoAction_2.as next >
Encoding:
Text File  |  2004-01-08  |  1.1 KB  |  33 lines

  1. this.x = new XML();
  2. this.x.ignoreWhite = true;
  3. this.x.controller = this;
  4. this.x.onLoad = function()
  5. {
  6.    var root = this.firstChild;
  7.    this.controller.titoli = new Array();
  8.    this.controller.n = new Array();
  9.    this.controller.fields = new Array();
  10.    this.controller.links = new Array();
  11.    this.controller.linkArr = new Array();
  12.    var i = 0;
  13.    while(i < root.childNodes.length)
  14.    {
  15.       this.controller.titoli.push(root.childNodes[i].attributes.title);
  16.       this.controller.n.push(root.childNodes[i].childNodes.length);
  17.       var i2 = 0;
  18.       while(i2 < root.childNodes[i].childNodes.length)
  19.       {
  20.          this.controller.fields.push(root.childNodes[i].childNodes[i2].attributes.title);
  21.          this.controller.linkArr.push({title:root.childNodes[i].childNodes[i2].attributes.title,url:root.childNodes[i].childNodes[i2].attributes.url,fileType:root.childNodes[i].childNodes[i2].attributes.type});
  22.          i2++;
  23.       }
  24.       i++;
  25.    }
  26.    this.controller.init();
  27. };
  28. this.loadMenu = function(file)
  29. {
  30.    this.x.load(file);
  31. };
  32. this.loadMenu("0_tab.xml");
  33.